﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Web;

namespace Cwing.UI
{
    internal sealed class DefaultProvider : ConfigFileProvider
    {
        static XmlDocument xmldoc;

        static Boolean load = false;

        static DefaultProvider()
        {
            xmldoc = new XmlDocument();
        }

        public override System.Xml.XmlDocument LoadFile()
        {
            if (!load)
            {
                xmldoc.Load(HttpContext.Current.Server.MapPath("~/ValidationConfiguration.xml"));
                load = true;
            }
            return xmldoc;
        }
    }
}
